home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Programming / EasyTools / EASYdms < prev    next >
Text File  |  1996-12-13  |  4KB  |  156 lines

  1. /*
  2.  
  3. $VER: EASYdms 1.0 (15.07.95) by David De Groot 
  4.  
  5. This script works with dms in your c: dir
  6.  
  7.  
  8. */
  9.  
  10.  
  11.  
  12. signal on break_c
  13. options failat 21 
  14. NL = '0a'x
  15.  
  16. bool = exists('libs:rexxreqtools.library')
  17. if BOOL = 0 
  18.  then say "You need RexxReqTools.library"
  19. else call addlib('rexxreqtools.library',0,-30)
  20.  
  21. dcheck = exists('c:dms')
  22. if dcheck = 0
  23.     then do
  24.      call rtezrequest("DMS not found in C:...",, 
  25.                       "Sorry!","ATTENTION!!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  26.     exit 
  27.   end
  28. else 
  29.  
  30. call rtezrequest("PACK or UNPACK a dmsfile?",,
  31.                  "_Pack|_Unpack","Tell me", 'rt_reqpos=reqpos_centerscr')  
  32.  
  33. if rtresult == 1
  34.  then call pack
  35. else call unpack
  36.  
  37.  
  38. /**/
  39. pack:
  40.  
  41. call rtezrequest("Do you want to add some text" nl,
  42.                  "to the DMSfile?",,
  43.                  "_Yes|_Not at all","Tell me",,
  44.                  'rtez_defaultresponse = 0 rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  45.  
  46. if rtresult == 1
  47.  then call tpack
  48. else do
  49.  
  50.  name = rtgetstring(,"Enter a name for the DMSfile" nl,
  51.                     "and select the diskdrive.",,
  52.                     " EASYdms ",,
  53.                     "DF_0|DF_1|DF_2|DF_3|_Cancel",,
  54.                     'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  55.  
  56. if rtresult == 0 then exit
  57. if rtresult == 1 then call rcommand(df0)
  58. if rtresult == 2 then call rcommand(df1)
  59. if rtresult == 3 then call rcommand(df2)
  60. if rtresult == 4 then call rcommand(df3)
  61.  
  62.  
  63. /**/
  64. unpack:
  65.  
  66. filename = rtfilerequest('ram:',,"Pick a dmsfile to unpack:", ,,
  67.                          'rt_reqpos=reqpos_centerscr')
  68.  
  69. if rtresult == 0
  70.  then
  71.     
  72. call rtezrequest("You picked no dmsfile." nl,
  73.                  "That ends this session I'm afraid!",
  74.                 ,"Ok!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  75.  
  76.  
  77. else
  78.  call rtezrequest("Tell me where to unpack:",,
  79.                   "DF_0|DF_1|DF_2|DF_3|_RAD|_Cancel",,
  80.                   "Info",'rt_reqpos=reqpos_centerscr')
  81.  
  82. if rtresult == 0 then exit
  83. if rtresult == 1 then call wcommand(df0)
  84. if rtresult == 2 then call wcommand(df1)
  85. if rtresult == 3 then call wcommand(df2)  
  86. if rtresult == 4 then call wcommand(df3)  
  87. if rtresult == 5 then call wcommand(rad) 
  88.  
  89.  
  90.  
  91. /**/    
  92. tpack:
  93.  
  94. name = rtgetstring(,"Enter a name for the DMSfile" nl,
  95.                    "and select the diskdrive.",,
  96.                    "EASYdms",,
  97.                    "DF_0|DF_1|DF_2|DF_3|_Cancel",,
  98.                    'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  99.  
  100. if rtresult == 0 then exit
  101. if rtresult == 1 then call tcommand(df0)
  102. if rtresult == 2 then call tcommand(df1)
  103. if rtresult == 3 then call tcommand(df2)  
  104. if rtresult == 4 then call tcommand(df3)  
  105.  
  106.  
  107. /**/
  108. tcommand:
  109.  
  110. address command
  111. 'dms read ram:' || name || ' text con:27/240/594/153/Enter¯TEXT:¯¯´Ctrl\´¯to¯END from ' || arg(1) || ':'
  112. exit   
  113.  
  114.  
  115. /**/
  116. rcommand:
  117.  
  118. address command
  119. 'dms read ram:' || name || ' from ' || arg(1) || ':'
  120. exit 
  121.  
  122.  
  123.  
  124. /**/
  125. wcommand:
  126. address command
  127. 'dms write ' || filename || ' to ' || arg(1) || ':'
  128. exit
  129.  
  130.  
  131. /**/
  132. break_c:       
  133.  
  134. call rtezrequest("You entered a break." nl,
  135.                  "This quits EASYdms...!",,
  136.                  "Right!","Heho!",'rt_reqpos=reqpos_centerscr rtez_flags=ezreqf_centertext')
  137.  
  138. exit
  139.  
  140.  
  141. /**********************************************************************
  142.  
  143.     Options for ENCRYPTED dmspacking:
  144.  
  145.     dms read ram: ' || name ||' from df0: encrypt ' || password || '
  146.     and DEcrypt for UNpacking.
  147.  
  148. ***********************************************************************/
  149.  
  150.                            
  151. /*  Futureplans: DISSOLVE ;-) */
  152.  
  153.  
  154.  
  155.  
  156.